package com.sangeng.controller;

import com.sangeng.annocation.SystemLog;
import com.sangeng.entity.ResponseResult;
import com.sangeng.entity.User;
import com.sangeng.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
public class UserInfoController {
    @Autowired

    UserService userService;

    @SystemLog(businessName = "根据用户id获取用户信息")
    @GetMapping("/userInfo")
    public ResponseResult getUserInfo(){

        return userService.getUserInfo();
    }

    @PutMapping("/userInfo")
    public ResponseResult updateUserInfo(@RequestBody User user){
         return  userService.updateUserInfo(user);

    }


}
